home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / nt / ntfi15.zip / ICTRLLER.H_ / ICTRLLER.H
C/C++ Source or Header  |  1994-12-21  |  3KB  |  92 lines

  1. #define __ICTRLLER_H
  2.  
  3.  
  4. #ifndef __SAINT_H
  5. #include "saint.h"
  6. #endif
  7. #ifndef __OPRDR_H
  8. #include "oprdr.h"
  9. #endif
  10. #ifndef __CTL3DLDR_H
  11. #include "ctl3dldr.h"
  12. #endif
  13. #ifndef __INSTALLR_H
  14. #include "installr.h"
  15. #endif
  16.  
  17.  
  18. class iinfo;
  19.  
  20. class dcontext;
  21.  
  22.  
  23. /* we must call init() to initilize it */
  24. class ictrller
  25. {
  26.    friend LRESULT CALLBACK bkwndproc(HWND wnd, UINT msg, WPARAM wp, LPARAM lp);
  27.  
  28.    int createshowbkwnd();
  29.    void loadctl3d();
  30.    void freectl3d();
  31.    void paint();
  32.    void drawbktxts(HDC dc);
  33.    void drawgradient(HDC dc, RECT &r);
  34.    void drawunregifneed(HDC dc);
  35.    void createbkwndclass();
  36.    HWND createbkwnd(int x, int y, int w, int h);
  37.    HFONT createbktxtf(dcontext &dc, int i);
  38.  
  39.    public:
  40.  
  41.   ~ictrller();
  42.  
  43.    int scrw;                                     /* width of screen (in pixel) */
  44.    int scrh;                                    /* height of screen (in pixel) */
  45.    int oldemode;                                        /* original error mode */
  46.    char diri[260];                                 /* install target directory */
  47.    HWND bkwnd;                                            /* background window */
  48.    saint ics;                                    /* is the component selected? */
  49.    saint ifs;                                         /* is the file selected? */
  50.    saint iis;                                         /* is the item selected? */
  51.    saint ies;                                        /* is the entry selected? */
  52.    saint irs;                                      /* is the reg key selected? */
  53.    filog log;                                                      /* log file */
  54.    iinfo *ii;                                       /* custom install info obj */
  55.    double pnt2pxlx;       /* horz factor to convert point (1/72 inch) to pixel */
  56.    double pnt2pxly;       /* vert factor to convert point (1/72 inch) to pixel */
  57.    double spaceneeded;                               /* hard disk space needed */
  58.    installer ir;                                                  /* installer */
  59.    ctl3dloader cl;                        /* used to load and free ctl3dv2.dll */
  60.  
  61.    virtual int run()       = 0;      /* derived class defines the control flow */
  62.    virtual void createii() = 0;            /* derived class should set ii here */
  63.  
  64.    char *getdiri()
  65.    {
  66.       return diri;
  67.    }
  68.    char *getdirs()
  69.    {
  70.       return ir.getdirs();
  71.    }
  72.    char *getdirw()
  73.    {
  74.       return ir.getdirw();
  75.    }
  76.    char *getdiry()
  77.    {
  78.       return ir.getdiry();
  79.    }
  80.  
  81.    int init(char dirs[]);
  82.    int askdir();
  83.    int welcome();
  84.    int execprgm(DWORD *r);
  85.    int copyfiles();
  86.    int setregkeys();
  87.    int createitems();
  88.    int selectcomps();
  89.    int setinientries();
  90.    void done();
  91. };
  92.